<?php
	include "conf/db_conf.php";
	$title = "club";
	$title = "%$title%";
	try {
		$conn = new PDO("mysql:host=$mn_dbHost;dbname=$mn_dbSchema",
						$mn_dbUserName, $mn_dbPassword);
		$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);    
		 
		$stmt = $conn->prepare('SELECT * FROM movies WHERE title like :title');
		$stmt->execute(array('title' => $title));
		
		//$stmt = $conn->prepare('SELECT * FROM movies');
		//$stmt->execute();
		
		while($row = $stmt->fetch()) {
			//print_r($row);
			echo $row["title"];
			echo "<br>";
		}
	} catch(PDOException $e) {
		echo 'ERROR: ' . $e->getMessage();
	}
?>